#include<iostream>

int main(){
    int n;
    std::cin>>n;
    if (n<0 || n !=(int)n){
        std::cout<<"invalid input"<<std::endl;
    } else {
        int result=1;
        for (int i=1;i<=n;++i){
            result*=i;
        }
        std::cout<<result<<std::endl;
    }
    return 0;
}